<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>任务记录页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/public.css">
<link href="${contextPath}/css/jquery-ui.min.css" rel="stylesheet">
<link href="${contextPath}/css/jquery-ui.theme.min.css" rel="stylesheet">
<style type="text/css">
	.input-group-addon,.form-control{padding:6px;}
	.ui-datepicker .ui-datepicker-title select{color:#1c94c4}
	.form-btn1{height: 50px;float: left;}
</style>
<script type="text/javascript" src="${contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/common.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.core.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.widget.js"></script>
</head>
<body>
	<div class="container" style="max-width: 1366px">
		<div class="panel panel-default" id="workerRecordList">
			<div class="panel-heading">查询码:${model.outBizNo}的任务记录列表</div>
			<div class="panel-body">
				<div style="clear: both;"></div>
			</div>
			<table class="table table-striped table-bordered">
				<thead>
					<tr>
						<th width='4%'>序号</th>
						<th width='15%'>用户名</th>
						<th width='8%'>姓名</th>
						<th width='20%'>任务名</th>
						<th width='15%'>包名</th>
						<th width='8%'>有效时间</th>
					</tr>
				</thead>
				<tbody id="workerRecord-tbody"></tbody>
			</table>
		</div>

	</div>
	<script type="text/javascript">
		var outBizNo = "${model.outBizNo }";
		
		$(document).ready(function(){
			queryWorkerRecordByOutBizNo();
		});
		
		queryWorkerRecordByOutBizNo = function(){
			$.ajax({
				type:'POST',
				data:{"outBizNo":outBizNo},
				url:'${contextPath}/security/queryWorkerRecordByOutBizNo',
				dataType:'json',
				success:function(list){
					$("#workerRecord-tbody").empty();			
					if(list == ""){
						$("#workerRecord-tbody").empty();
						$("#workerRecord-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						$.each(list,function(i,item){
							$("#workerRecord-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.userName+"</td>"+
								"<td>"+item.realName+"</td>"+
								"<td>"+item.taskName.split("@")[0]+"</td>"+
								"<td>"+item.packName+"</td>"+
								"<td>"+item.taskMarkTime+"</td>"+ 
							"</tr>"		
							);		
						});
					}
				}
			});
		};
	</script>
</body>
</html>
